`:top
A `!Unix shell`! is a `F33f`_`[shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Shell_(computing)]`_`f that provides a `F33f`_`[command-line`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Command-line_interface]`_`f `F33f`_`[user interface`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=User_interface]`_`f for a `F33f`_`[Unix-like`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Unix-like]`_`f `F33f`_`[operating system`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Operating_system]`_`f. A Unix shell provides a `F33f`_`[command language`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Command_language]`_`f that can be used either `F33f`_`[interactively`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Interactively]`_`f or for writing a `F33f`_`[shell script`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Shell_script]`_`f.`:cite-ref-2[`F5bf`_`[2`#cite-note-2]`_`f] A user typically interacts with a Unix shell via a `F33f`_`[terminal emulator`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Terminal_emulator]`_`f; however, direct access via serial hardware connections or `F33f`_`[Secure Shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Secure_Shell]`_`f are common for server systems. Although use of a Unix shell is popular with some users, others prefer to use a `F33f`_`[windowing system`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Windowing_system]`_`f such as desktop `F33f`_`[Linux distribution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Linux_distribution]`_`f or `F33f`_`[macOS`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=MacOS]`_`f instead of a command-line interface.
A user may have access to multiple Unix shells with one configured to run by default when the user `F33f`_`[logs in`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Log_in]`_`f interactively. The `F33f`_`[default`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Default_(computer_science)]`_`f selection is typically stored in a user's profile; for example, in the local `F33f`_`[passwd`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Passwd_(file)]`_`f file or in a distributed configuration system such as `F33f`_`[NIS`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Network_Information_Service]`_`f or `F33f`_`[LDAP`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Lightweight_Directory_Access_Protocol]`_`f. A user may use other shells `F33f`_`[nested`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Nesting_(computing)]`_`f inside the default shell.
A Unix shell may provide many features including: `F33f`_`[variable definition and substitution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Environment_variable]`_`f, `F33f`_`[command substitution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Command_substitution]`_`f, `F33f`_`[filename wildcarding`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Wildcard_character]`_`f, `F33f`_`[stream piping`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Pipeline_(Unix)]`_`f, `F33f`_`[control flow structures`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Control_flow]`_`f (`F33f`_`[condition-testing`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Conditional_(programming)]`_`f and `F33f`_`[iteration`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Iteration]`_`f), `F33f`_`[working directory context`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Working_directory]`_`f, and `F33f`_`[here document`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Here_document]`_`f.
>>Contents
• `F0af`_`[Early shells`#early-shells]`_`f
• `F0af`_`[Bourne shell`#bourne-shell]`_`f
• `F0af`_`[C shell`#c-shell]`_`f
• `F0af`_`[Configuration files`#configuration-files]`_`f
• `F0af`_`[Other shells`#other-shells]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
-─
>>Early shells
The first Unix shell was the `F33f`_`[Thompson shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Thompson_shell]`_`f, `*sh`*, written by `F33f`_`[Ken Thompson`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Ken_Thompson_(computer_programmer)]`_`f at `F33f`_`[Bell Labs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bell_Labs]`_`f and distributed with Versions 1 through 6 of Unix, from 1971 to 1975.`:cite-ref-v6hist-3-0[`F5bf`_`[3`#cite-note-v6hist-3]`_`f] Though rudimentary by modern standards, it introduced many of the basic features common to all later Unix shells, including piping, simple control structures using `B100`F9d9if`f`b and `B100`F9d9goto`f`b, and filename wildcarding. Though not in current use, it is still available as part of some `F33f`_`[Ancient UNIX`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Ancient_UNIX]`_`f systems.
It was modeled after the `F33f`_`[Multics`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Multics]`_`f shell, developed in 1965 by American software engineer `F33f`_`[Glenda Schroeder`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Glenda_Schroeder]`_`f. Schroeder's Multics shell was itself modeled after the `F33f`_`[RUNCOM`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=RUNCOM]`_`f program `F33f`_`[Louis Pouzin`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Louis_Pouzin]`_`f showed to the Multics Team. The "rc" suffix on some Unix configuration files (e.g. ".bashrc" or ".vimrc"), is a remnant of the RUNCOM ancestry of Unix shells.`:cite-ref-vleck-1-1[`F5bf`_`[1`#cite-note-vleck-1]`_`f]`:cite-ref-pouzin-4-0[`F5bf`_`[4`#cite-note-pouzin-4]`_`f]
The `F33f`_`[PWB shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=PWB_shell]`_`f or Mashey shell, `*sh`*, was an upward-compatible version of the Thompson shell, augmented by `F33f`_`[John Mashey`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=John_Mashey]`_`f and others and distributed with the `F33f`_`[Programmer's Workbench UNIX`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=PWB/UNIX]`_`f, circa 1975–1977. It focused on making shell programming practical, especially in large shared computing centers. It added shell variables (precursors of `F33f`_`[environment variables`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Environment_variable]`_`f, including the search path mechanism that evolved into $PATH), user-executable shell scripts, and interrupt-handling. Control structures were extended from if/goto to if/then/else/endif, switch/breaksw/endsw, and while/end/break/continue. As shell programming became widespread, these external commands were incorporated into the shell itself for performance.
But the most widely distributed and influential of the early Unix shells were the `F33f`_`[Bourne shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bourne_shell]`_`f and the `F33f`_`[C shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f. Both shells have been used as the coding base and model for many derivative and work-alike shells with extended feature sets.`:cite-ref-5[`F5bf`_`[5`#cite-note-5]`_`f]
>>>Bourne shell
The `F33f`_`[Bourne shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bourne_shell]`_`f, `*sh`*, was a new Unix shell by `F33f`_`[Stephen Bourne`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Stephen_R._Bourne]`_`f at Bell Labs.`:cite-ref-6[`F5bf`_`[6`#cite-note-6]`_`f] Distributed as the shell for UNIX Version 7 in 1979, it introduced the rest of the basic features considered common to all the later Unix shells, including `F33f`_`[here documents`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Here_document]`_`f, `F33f`_`[command substitution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Command_substitution]`_`f, more generic `F33f`_`[variables`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Variable_(programming)]`_`f and more extensive builtin `F33f`_`[control structures`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Control_flow]`_`f. The language, including the use of a reversed keyword to mark the end of a block, was influenced by `F33f`_`[ALGOL 68`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ALGOL_68]`_`f.`:cite-ref-7[`F5bf`_`[7`#cite-note-7]`_`f] Traditionally, the Bourne shell program name is sh and its path in the Unix file system hierarchy is /bin/sh. But a number of compatible work-alikes are also available with various improvements and additional features. On many systems, sh may be a `F33f`_`[symbolic link`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Symbolic_link]`_`f or `F33f`_`[hard link`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Hard_link]`_`f to one of these alternatives:
• `F33f`_`[Almquist shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Almquist_shell]`_`f (ash): written as a BSD-licensed replacement for the Bourne Shell; often used in resource-constrained environments. The sh of `F33f`_`[FreeBSD`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=FreeBSD]`_`f, `F33f`_`[NetBSD`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=NetBSD]`_`f (and their derivatives) are based on ash that has been enhanced to be `F33f`_`[POSIX`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=POSIX]`_`f conformant.
• `F33f`_`[Busybox`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Busybox]`_`f: a set of Unix utilities for small and embedded systems, which includes 2 shells: ash, a derivative of the Almquist shell; and hush, an independent implementation of a Bourne shell.
• `F33f`_`[Debian Almquist shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Debian_Almquist_shell]`_`f (dash): a modern replacement for ash in `F33f`_`[Debian`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Debian]`_`f and `F33f`_`[Ubuntu`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Ubuntu_(operating_system)]`_`f
• `F33f`_`[Bourne-Again shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bash_(Unix_shell)]`_`f (bash): written as part of the `F33f`_`[GNU Project`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=GNU_Project]`_`f to provide a superset of Bourne Shell functionality. This shell can be found installed and is the default interactive shell for users on most `F33f`_`[Linux`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Linux]`_`f systems; it provides both interactive mode (implemented by GNU Readline) or script-mode.
• `F33f`_`[KornShell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=KornShell]`_`f (ksh): written by `F33f`_`[David Korn`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=David_Korn_(computer_scientist)]`_`f based on the Bourne shell sources`:cite-ref-8[`F5bf`_`[8`#cite-note-8]`_`f] while working at `F33f`_`[Bell Labs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bell_Labs]`_`f
• `F33f`_`[Public domain Korn shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Pdksh]`_`f (pdksh)
• `F33f`_`[MirBSD Korn shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Mksh]`_`f (mksh): a descendant of the `F33f`_`[OpenBSD`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=OpenBSD]`_`f /bin/ksh and pdksh, developed as part of `F33f`_`[MirOS BSD`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=MirOS_BSD]`_`f
• `F33f`_`[Z shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Z_shell]`_`f (zsh): a relatively modern shell that is partially `F33f`_`[backward compatible`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Backward_compatible]`_`f with `F33f`_`[bash`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bash_(Unix_shell)]`_`f. It's the default shell in `F33f`_`[Kali Linux`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Kali_Linux]`_`f since 2020.4 and `F33f`_`[macOS`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=MacOS]`_`f since 10.15 `F33f`_`[Catalina`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=MacOS_Catalina]`_`f.
The `F33f`_`[POSIX`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=POSIX]`_`f standard specifies its standard shell as a strict subset of the `F33f`_`[Korn shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=KornShell]`_`f, an enhanced version of the Bourne shell. From a user's perspective the Bourne shell was immediately recognized when active by its characteristic default command line prompt character, the dollar sign ($).
>>>C shell
The `F33f`_`[C shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f, `*csh`*, was modeled on the `F33f`_`[C programming language`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_programming_language]`_`f, including the control structures and the expression grammar. It was written by `F33f`_`[Bill Joy`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bill_Joy]`_`f as a graduate student at `F33f`_`[University of California, Berkeley`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=University_of_California,_Berkeley]`_`f, and was widely distributed with `F33f`_`[BSD Unix`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Berkeley_Software_Distribution]`_`f.`:cite-ref-9[`F5bf`_`[9`#cite-note-9]`_`f]
The C shell also introduced many features for interactive work, including the `F33f`_`[history`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f and `F33f`_`[editing`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f mechanisms, `F33f`_`[aliases`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f, `F33f`_`[directory stacks`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f, `F33f`_`[tilde notation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f, `F33f`_`[cdpath`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f, `F33f`_`[job control`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f and `F33f`_`[path hashing`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_shell]`_`f. On many systems, csh may be a `F33f`_`[symbolic link`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Symbolic_link]`_`f or `F33f`_`[hard link`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Hard_link]`_`f to `F33f`_`[TENEX C shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=TENEX_C_shell]`_`f (tcsh), an improved version of Joy's original version. Although the interactive features of csh have been copied to most other shells, the language structure has not been widely copied. The only work-alike is `F33f`_`[Hamilton C shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Hamilton_C_shell]`_`f, written by Nicole Hamilton, first distributed on `F33f`_`[OS/2`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=OS/2]`_`f in 1988 and on `F33f`_`[Windows`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Windows]`_`f since 1992.`:cite-ref-10[`F5bf`_`[10`#cite-note-10]`_`f]
>>Configuration files
Shells read configuration files in various circumstances. These files usually contain commands for the shell and are executed when loaded; they are usually used to set important variables used to find executables, like `F33f`_`[$PATH`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=$PATH]`_`f, and others that control the behavior and appearance of the shell. The table in this section shows the configuration files for popular shells.`:cite-ref-11[`F5bf`_`[11`#cite-note-11]`_`f]
`t
| Configuration file | sh | ksh | csh | tcsh | bash | zsh |
|---|---|---|---|---|---|---|
| /etc/.login | | | login | login | | |
| /etc/csh.cshrc | | | yes | yes | | |
| /etc/csh.login | | | login | login | | |
| ~/.tcshrc | | | | yes | | |
| ~/.cshrc | | | yes | yes [ a ] | | |
| /etc/ksh.kshrc | | int. | | | | |
| /etc/sh.shrc | int. [ b ] | | | | | |
| $ENV (typically ~/.kshrc ) [ 12 ] | int. [ c ] [ d ] | int. | | | int. [ e ] | |
| ~/.login | | | login | login | | |
| ~/.logout | | | login | login | | |
| /etc/profile | login | login | | | login | login [ f ] |
| ~/.profile | login | login | | | login [ g ] | login [ f ] |
| ~/.bash_profile | | | | | login [ g ] | |
| ~/.bash_login | | | | | login [ g ] | |
| ~/.bash_logout | | | | | login | |
| ~/.bashrc | | | | | int.+n/login | |
| /etc/zshenv | | | | | | yes |
| /etc/zprofile | | | | | | login |
| /etc/zshrc | | | | | | int. |
| /etc/zlogin | | | | | | login |
| /etc/zlogout | | | | | | login |
| ~/.zshenv | | | | | | yes |
| ~/.zprofile | | | | | | login |
| ~/.zshrc | | | | | | int. |
| ~/.zlogin | | | | | | login |
| ~/.zlogout | | | | | | login |
`t
Explanation:
• blank means a file is not read by a shell at all.
• "yes" means a file is always read by a shell upon startup.
• "login" means a file is read if the shell is a login shell.
• "n/login" means a file is read if the shell is not a login shell.
• "int." means a file is read if the shell is interactive.
`:cite-note-12`!1.`! only if ~/.tcshrc not found
`:cite-note-13`!2.`! Newer versions of the Bourne Shell only
`:cite-note-16`!3.`! Available on systems that support the "User Portability Utilities option"; value of the variable must be an `*absolute`* path, and it is ignored "if the user's real and effective user IDs or real and effective group IDs are different."`:cite-ref-15[`F5bf`_`[13`#cite-note-15]`_`f]
`:cite-note-17`!4.`! $ENV is $HOME/.shrc in newer versions of the Bourne Shell
`:cite-note-19`!5.`! Same behavior as sh, but only if invoked as sh (bash 2+) or, since bash 4.2, also if invoked `*explicitly`* in POSIX compatibility mode (with options --posix or -o posix).`:cite-ref-18[`F5bf`_`[14`#cite-note-18]`_`f]
`:cite-note-zsh-profiles-20`!6.`! Only in sh/ksh compatibility mode (when invoked as bash, sh, ksh)
`:cite-note-bash-profiles-21`!7.`! The first readable file in order of ~/.bash_profile, ~/.bash_login and ~/.profile; and only ~/.profile if invoked as sh or, as of at least Bash 4.2, if invoked `*explicitly`* in POSIX compatibility mode (with options --posix or -o posix)
>>Other shells
Variations on the Unix shell concept that don't derive from Bourne shell or C shell include the following:`:cite-ref-22[`F5bf`_`[15`#cite-note-22]`_`f]
• `F33f`_`[es`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Es_(Unix_shell)]`_`f – A `F33f`_`[functional programming`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Functional_programming]`_`f rc-compatible shell written in the mid-1990s.
• `F33f`_`[Friendly interactive shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Friendly_interactive_shell]`_`f (fish) – First released in 2005.
• `F33f`_`[PowerShell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=PowerShell]`_`f – An `F33f`_`[object-oriented`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Object-oriented_programming]`_`f shell developed originally for Windows OS and now available to macOS and Linux.
• `F33f`_`[Qshell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Qshell]`_`f – A shell on the `F33f`_`[IBM i`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=IBM_i]`_`f operating system based on `F33f`_`[POSIX`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=POSIX]`_`f and `F33f`_`[X/Open`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=X/Open]`_`f standards.
• `F33f`_`[rc`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Rc_shell]`_`f – The default shell on `F33f`_`[Plan 9 from Bell Labs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Plan_9_from_Bell_Labs]`_`f and `F33f`_`[Version 10 Unix`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Version_10_Unix]`_`f written by `F33f`_`[Tom Duff`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Tom_Duff]`_`f. Ports have been made to various `F33f`_`[Unix-like`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Unix-like]`_`f operating systems.
• `F33f`_`[scsh`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Scsh]`_`f – A `F33f`_`[Scheme`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Scheme_(programming_language)]`_`f Shell.
• `F33f`_`[wish`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Wish_(Unix_shell)]`_`f – A windowing shell for `F33f`_`[Tcl/Tk`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Tcl/Tk]`_`f.
>>See also
• `F33f`_`[Comparison of command shells`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Comparison_of_command_shells]`_`f
• `F33f`_`[List of POSIX commands`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=List_of_POSIX_commands]`_`f
• `F33f`_`[Read–eval–print loop`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Read–eval–print_loop]`_`f – Computer programming environment
• `F33f`_`[Restricted shell`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Restricted_shell]`_`f
• `F33f`_`[Shell account`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Shell_account]`_`f – User account on a remote server
• `F33f`_`[Shell script`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Shell_script]`_`f – Script written for an operating system shell
• `F33f`_`[Shell shoveling`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Shell_shoveling]`_`f – Redirecting the input and output of a shell to a service so that it can be remotely accessed
>>References
`:cite-note-vleck-1`!1.`! `:citereftom-van-vleck1995`aTom Van Vleck (1995-02-05). "Unix and Multics". Multicians.org. Retrieved 2012-08-14.
`:cite-note-2`!2.`! `F0af`_`[↑`#cite-ref-2]`_`f `:citerefbourne-stephen-r-1983`aBourne, Stephen R. (October 1983). "The Unix Shell". `*BYTE`*. p. 187. Retrieved 30 January 2015.
`:cite-note-v6hist-3`!3.`! `F0af`_`[↑`#cite-ref-v6hist-3-0]`_`f "V6 Thompson Shell Port - History". V6shell.org. Retrieved 2012-08-14.
`:cite-note-pouzin-4`!4.`! `F0af`_`[↑`#cite-ref-pouzin-4-0]`_`f `:citereflouis-pouzin2000`aLouis Pouzin (2000-11-25). "The Origin of the Shell". Multicians.org. Retrieved 2012-08-14.
`:cite-note-5`!5.`! `F0af`_`[↑`#cite-ref-5]`_`f `:citerefnikolai-bezroukov2015`a`F33f`_`[Nikolai Bezroukov`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Nikolai_Bezroukov]`_`f (2015-08-13). "Introduction to the Unix shell history". Softpanorama. Archived from the original on 2022-06-08. Retrieved 2016-08-21.
`:cite-note-6`!6.`! `F0af`_`[↑`#cite-ref-6]`_`f `:citerefbourne2009`a`F33f`_`[Bourne, Stephen`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Stephen_R._Bourne]`_`f (2009-03-05). "The A-Z of Programming Languages: Bourne shell, or sh" (Interview). Interviewed by Howard Dahdah. `F33f`_`[Computerworld`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computerworld]`_`f. Retrieved 2022-08-16.
`:cite-note-7`!7.`! `F0af`_`[↑`#cite-ref-7]`_`f "`*Re: Late Bloomers Revisited`*". Retrieved 20 September 2014.
`:cite-note-8`!8.`! `F0af`_`[↑`#cite-ref-8]`_`f `:citerefkorn1994`aKorn, David G. (October 26, 1994), "ksh - An Extensible High Level Language", `*Proceedings of the USENIX 1994 Very High Level Languages Symposium`*, USENIX Association, retrieved February 5, 2015, Instead of inventing a new script language, we built a form entry system by modifying the Bourne shell, adding built-in commands as necessary.
`:cite-note-9`!9.`! `F0af`_`[↑`#cite-ref-9]`_`f Harley Hahn, Harley Hahn's Guide to Unix and Linux: Unix/Linux Timeline.
`:cite-note-10`!10.`! `F0af`_`[↑`#cite-ref-10]`_`f "Hamilton C shell for Windows Release Notes 4.0". Retrieved 20 September 2014.
`:cite-note-11`!11.`! `F0af`_`[↑`#cite-ref-11]`_`f "Different UNIX Shells". unixnote.com. 2010. Archived from the original on 2016-04-03. Retrieved 2016-08-21.
`:cite-note-14`!8.`! SCO Unix Group, SCO Unixware 7 documentation, 22 Apr 2004, retrieved 18 Oct 2012.
`:cite-note-15`!13.`! `F0af`_`[↑`#cite-ref-15]`_`f "Shell Command Language". `*opengroup.org`*. Retrieved 15 June 2015.
`:cite-note-18`!14.`! `F0af`_`[↑`#cite-ref-18]`_`f "Bash Reference Manual: Bash Startup Files". `*gnu.org`*. Retrieved 15 June 2015.
`:cite-note-22`!15.`! `F0af`_`[↑`#cite-ref-22]`_`f "FreeBSD Ports: Shells". Freebsd.org. 2014-03-30. Archived from the original on 2021-01-12. Retrieved 2014-04-05.
`c`F0af`_`[↑ Back to top`#top]`_`f`a